<?php
session_start() ;
if(!isset($_SESSION["login"]) || $_SESSION["login"] == "")
{   
  header("Location: index.php?error=4") ;
}
require_once('preheader.php'); // <-- this include file MUST go first before any HTML/output
include ('ajaxCRUD.class.php'); // <-- this include file MUST go first before any HTML/output
require("fonctions.php");
$code=$_GET["error"];
$action = $_GET["action"];
if($lang=="FR"){
    $lang="FR";
    include("lang/fr_lang.php");
}elseif($lang=="EN"){
    $lang="EN";
    include("lang/en_lang.php");
}else{
    $lang="FR";
    include("lang/fr_lang.php");
}

?>

<html>
<head>
<title><?php echo TXT_TITLE;?></title>
 <link rel="stylesheet" type="text/css" href="style.css" >  
<script type="text/javascript">
//<![CDATA[

function valider() {
  // si la valeur du champ prenom est non vide
  if((document.form1.nom.value != "") && (document.form1.prenom.value != "") && (document.form1.email.value != "") && (document.form1.profil.value != "") && (document.form1.instit.value != "")) {
    // alors on envoie le formulaire
    document.form1.submit();
    return true;
  }
  else {
    // sinon on affiche un message
    alert("Remplir les champs obligatoires avant d'enregistrer svp !");
    return false;
  }

}
</script>
</head>

<body>
<?php require("menu.php");
?>
<br>
<?php echo error_message($code);?>
<div class="texte_acc">
    <p class="titre_1"><u><?php echo TXT_TYPE_PROD;?> </u></p>


<?php
    $tblDemo = new ajaxCRUD("Item", "type_productions", "id");
    $tblDemo->omitPrimaryKey();
    $tblDemo->displayAs("descr", "Description");
    $tblDemo->setLimit(5);
    $tblDemo->addAjaxFilterBox('descr');
    $tblDemo->showTable();
        

	echo "<br /><hr ><br />\n";

?>


    
    
</div>

</body>

</html>
